Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend issue template yaml engine #29274

Merged
merged 48 commits into from
Mar 4, 2024

Conversation

6543
Copy link
Member

@6543 6543 commented Feb 20, 2024

Add new option:

visible: witch can hide a specific field of the form or the created content afterwards

It is a string array witch can contain form and content. If only form is present, it wont show up in the created issue afterwards and the other way around. By default it sets both except for markdown

As they are optional and github don't have any similar thing, it is non breaking and also do not conflict with it.

With this you can:

  • define "post issue creation" elements like a TODO list to track an issue state
  • make sure to have a checkbox that reminds the user to check for a thing but dont have it in the created issue afterwards
  • define markdown for the created issue (was the downside of using yaml instead of md in the past)
  • ...

Demo

name: New Contribution
description: External Contributor creating a pull

body:
- type: checkboxes
  id: extern-todo
  visible: [form]
  attributes:
    label: Contribution Guidelines
    options:
      - label: I checked there exist no similar feature to be extended
        required: true
      - label: I did read the CONTRIBUTION.MD 
        required: true
- type: checkboxes
  id: intern-todo
  visible: [content]
  attributes:
    label: Maintainer Check-List
    options:
      - label: Does this pull follow the KISS principe
      - label: Checked if internal bord was notifyed  
# ....

Demo Video


Sponsored by Kithara Software GmbH

@6543 6543 added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Feb 20, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 20, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 20, 2024
@6543 6543 added this to the 1.22.0 milestone Feb 20, 2024
@6543 6543 added the pr/wip This PR is not ready for review label Feb 20, 2024
@6543

This comment was marked as resolved.

@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label Feb 20, 2024
modules/templates/helper.go Outdated Show resolved Hide resolved
@6543 6543 removed the pr/wip This PR is not ready for review label Feb 20, 2024
@6543 6543 requested a review from jolheiser March 1, 2024 18:49
Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this more, I wanted to clarify, is this intended to be settable for all types or just checkboxes?
The docs changes seem to imply all, as does the description, but a lot of the code seems to be only checking for checkboxes?

modules/issue/template/template.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 3, 2024
docs/content/usage/issue-pull-request-templates.en-us.md Outdated Show resolved Hide resolved
docs/content/usage/issue-pull-request-templates.en-us.md Outdated Show resolved Hide resolved
modules/issue/template/unmarshal.go Outdated Show resolved Hide resolved
modules/issue/template/unmarshal.go Show resolved Hide resolved
modules/issue/template/template.go Show resolved Hide resolved
modules/issue/template/template.go Outdated Show resolved Hide resolved
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes I proposed can still be added later on, so here's my approval to get it into 1.22.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 3, 2024
@6543
Copy link
Member Author

6543 commented Mar 3, 2024

@delvh addressed your issues :)

@6543
Copy link
Member Author

6543 commented Mar 3, 2024

The changes I proposed can still be added later on, so here's my approval to get it into 1.22.

feel free to create an issue and assign me if the wording or something else need a followup then :)

@6543 6543 merged commit 77e29e0 into go-gitea:main Mar 4, 2024
26 checks passed
@6543 6543 deleted the extend-issue-template-engine branch March 4, 2024 00:37
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 4, 2024
* upstream/main:
  Replace some `gt-` classes with `tw-` (go-gitea#29570)
  Enable/disable owner and repo projects independently (go-gitea#28805)
  Add an trailing slash to dashboard links (go-gitea#29555)
  Extend issue template yaml engine (go-gitea#29274)
  [skip ci] Updated licenses and gitignores
  Fix workflow trigger event IssueChangeXXX bug (go-gitea#29559)
  Fix 500 when pushing release to an empty repo (go-gitea#29554)
  Update js and py dependencies, bump python (go-gitea#29561)
  Filter Repositories by type (go-gitea#29231)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/docs size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants